<form method="post" class="form-x one-form form-auto" id="form" action="{url()}">
    <div class="tab one-tab">
        <div class="panel one-box  active">
            <div class="panel-head">
                <div class="tab-head">
                    <strong>{$name}业绩</strong>
                    <ul class="tab-nav">
                        <li class="active"><a href="#tab-1">基本信息</a>
                        </li>
                    </ul>
                </div>
            </div>
            <div class="tab-body">
                <div class="tab-panel active" id="tab-1">
                    <div class="form-group">
                        <div class="label">
                            <label>付款日期</label>
                        </div>
                        <div class="field">
                            <input type="text" class="input" id="time" name="time" size="60" datatype="*" value="{$info.time}">
                            
                            <div class="input-note">付款日期请不要填写特殊字符，格式：2015-01-01</div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="label">
                            <label>付款方式</label>
                        </div>
                        <div class="field">
                            <input type="text" class="input" id="type" name="type" size="60" datatype="*" value="{$info.type}">
                            
                            <div class="input-note">付款方式请不要填写特殊字符，格式：支付宝、网银、农行</div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="label">
                            <label>付款金额</label>
                        </div>
                        <div class="field">
                            <input type="text" class="input" id="price" name="price" size="60" datatype="*" value="{$info.price}">
                            
                            <div class="input-note">付款金额请不要填写特殊字符，格式：100、200.5</div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="label">
                            <label>付款名称</label>
                        </div>
                        <div class="field">
                            <input type="text" class="input" id="name" name="name" size="60" datatype="*" value="{$info.name}">
                            
                            <div class="input-note">付款名称请填写客户付款时名称，方便查账</div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="label">
                            <label>付款级别</label>
                        </div>
                        <div class="field">
                            <input type="text" class="input" id="level" name="level" size="60" datatype="*" value="{$info.level}">
                            
                            <div class="input-note">付款级别请不要填写特殊字符，格式：1钻、2钻、3钻、皇冠</div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="label">
                            <label>销售客服</label>
                        </div>
                        <div class="field">
                            <input type="text" class="input" id="kf" name="kf" size="60" datatype="*" value="{$info.kf}">
                            
                            <div class="input-note">销售客服请填写员工编号</div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="label">
                            <label>客户Q Q</label>
                        </div>
                        <div class="field">
                            <input type="text" class="input" id="kh" name="kh" size="60" datatype="*" value="{$info.kh}">
                            
                            <div class="input-note">客户Q Q请填写客户实际QQ</div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="label">
                            <label>备&nbsp;&nbsp;注</label>
                        </div>
                        <div class="field">
                            <textarea class="input" id="content" name="content"  rows="3" cols="62" >{$info.content}</textarea>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="label">
                            <label>付款截图</label>
                        </div>
                        <div class="field">
                            <input type="text" class="input" id="images" name="images" size="38" value="{$info.images}">
                            <a class="button bg-blue button-small  js-img-upload" data="images" id="image_upload" preview="image_preview" href="javascript:;" ><span class="icon-upload"> 上传</span></a>
                            <a class="button bg-blue button-small icon-picture-o" id="image_preview" href="javascript:;" > 预览</a>
                        </div>
                    </div>
                    
                    <div class="form-group">
                        
                    </div>
                    
                    <div id="expand"></div>
                    <div class="form-group">
                        <div class="label">
                            <label>审核状态</label>
                        </div>
                        <div class="field">
                                <div class="button-group radio">
                                    <label class="button active"><input name="status" value="1" checked="checked" type="radio">
                                    <span class="icon icon-check"></span> 已审核</label>
                                    <label class="button active"><input name="status" value="0" type="radio">
                                    <span class="icon icon-times"></span> 未审核</label>
                                </div>
                                <div class="input-note">审核开单信息</div>
                            </div>
                    </div>
                </div>
            </div>
            <div class="panel-foot">
                <div class="form-button">
                    <div id="tips"></div>
                    <input type="hidden" name="content_id" id="content_id" type="hidden" value="{$info.content_id}">
                    <button class="button bg-main" type="submit">保存</button>
                    <button class="button bg" type="reset">重置</button>
                </div>
            </div>
        </div>
    </div>
</form>
<script>
    //var content_editor = 'xxxx';
    Do.ready('base', function () {
        //表单综合处理
        $('#form').oneFormPage();
        //上传缩略图
        $('#upload').oneFileUpload({
            type: 'jpg,png,gif,bmp',
            complete: function (data) {
                $('#content_image').attr('src', data.url);
            }
        });
        //提取关键词
        $('#getKeyword').click(function () {
            $.post('{url("onecms/ContentTools/getKerword")}', {
                    title: $('#content').val(),
                    content: $('#description').val()
                },
                function (data) {
                    if (data.status) {
                        $('#keywords').val(data.info);
                    } else {
                        alert(data.info);
                    }
                }, 'json');
        });
        //动态获取扩展字段
        $('#class_id').change(function() {
            $('#expand').load('{url("onecms/AdminExpand/getField")}',{class_id:$(this).val(),content_id:$('#content_id').val()},function(){
                $('#expand').oneFormPage({form:false});
            });
        });
        $('#class_id').change();
        
    }); 
</script>